
/* Generated by Interface Builder */

#import "MitreView.h"
#include <dpsclient/wraps.h>
// #include <appkit/Control.h>
#include <appkit/Matrix.h>


@implementation MitreView

- lineJoinType:sender
{
	lineJoin = [sender selectedRow];
	[self display];
    return self;
}

- lineCapType:sender
{
	lineCap = [sender selectedRow];
	[self display];
    return self;
}

- drawSelf:(NXRect*)r :(int)c
{
    NXEraseRect(&bounds);
    PSsetgray(NX_BLACK);
    PSsetlinewidth(50.0);
    PSsetlinejoin(lineJoin);
    PSsetlinecap(lineCap);
    PSnewpath();
      PSmoveto(400.0, 50.0);
      PSlineto(100.0, 50.0);
      PSlineto(400.0, 250.0);
    PSstroke();

	// draw the thin white line on top
    PSsetgray(NX_WHITE);
    PSsetlinewidth(1.0);
    PSnewpath();
    	PSmoveto(400.0, 50.0);
    	PSlineto(100.0, 50.0);
    	PSlineto(400.0, 250.0);
    PSstroke();
    PSnewpath();
    	PSarc(400.0, 50.0, 4.0, 0.0, 360.0);
    	PSmoveto(100.0, 50.0);
    	PSarc(100.0, 50.0, 4.0, 0.0, 360.0);
    	PSmoveto(400.0, 250.0);
    	PSarc(400.0, 250.0, 4.0, 0.0, 360.0);
    PSfill();
    return self;
}


@end
